/*
 * SplitPane.java
 */

package xq.swing;

import java.awt.Component;
import javax.swing.JSplitPane;
import javax.swing.plaf.basic.BasicSplitPaneDivider;

/**
 *
 * @author ThorntonRP
 */
public class SplitPane extends JSplitPane {
	
	private static final long serialVersionUID = 8573762672239118637L;

	public SplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent) {
		super(newOrientation, newContinuousLayout, newLeftComponent, newRightComponent);
		init();
	}

	public SplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent) {
		super(newOrientation, newLeftComponent, newRightComponent);
		init();
	}

	public SplitPane(int newOrientation, boolean newContinuousLayout) {
		super(newOrientation, newContinuousLayout);
		init();
	}

	public SplitPane(int newOrientation) {
		super(newOrientation);
		init();
	}

	public SplitPane() {
		init();
	}
	
	private void init() {
		setBorder(null);
		for (Component c : getComponents()) {
			if (c instanceof BasicSplitPaneDivider) {
				BasicSplitPaneDivider divider = (BasicSplitPaneDivider) c;
				divider.setBorder(null);
			}
		}
	}
}
